<html>
<title>Setup Instructions for the Google API Client Library for Java</title>
<body>
<h2>Setup Instructions for the Google API Client Library for Java</h2>

<h3>Browse Online</h3>

<ul>
  <li><a
    href="http://code.google.com/p/google-api-java-client/source/browse/">Browse
  Source</a></li>
</ul>

<h3>Checkout Instructions</h3>

<p><b>Prerequisites:</b> install <a href="http://java.com">Java 6</a>, <a
  href="http://mercurial.selenic.com/">Mercurial</a> and <a
  href="http://maven.apache.org/download.html">Maven</a>. You may need to set
your <code>JAVA_HOME</code>.</p>

<pre><code>hg clone https://google-api-java-client.googlecode.com/hg/ google-api-java-client
cd google-api-java-client
mvn install</code></pre>

There are two named branches:
<ul>
  <li>The "default" branch has the stable 1.4 library. This is the default
  branch that is checked out with the instructions above.</li>
  <li>The "dev" branch has the development 1.5 library. To switch to this
  branch, run: <pre><code>hg update dev
mvn clean install</code></pre></li>
</ul>

<h3>Setup Project in Eclipse 3.5</h3>

<p><b>Prerequisites:</b> install <a href="http://www.eclipse.org/downloads/">Eclipse</a>,
the <a href="http://javaforge.com/project/HGE">Mercurial plugin</a>, the <a
  href="http://m2eclipse.sonatype.org/installing-m2eclipse.html">Maven
plugin</a>, and the <a
  href="http://developer.android.com/sdk/eclipse-adt.html#installing">Android
plugin</a>.</p>

<ul>
  <li>Setup Eclipse Preferences
  <ul>
    <li>Window &gt; Preferences... (or on Mac, Eclipse &gt; Preferences...)</li>
    <li>Select Maven
    <ul>
      <li>check on "Download Artifact Sources"</li>
      <li>check on "Download Artifact JavaDoc"</li>
    </ul>
    </li>
    <li>Select Android
    <ul>
      <li>setup SDK location</li>
    </ul>
    </li>
  </ul>
  </li>
  <li>Import projects
  <ul>
    <li>File &gt; Import...</li>
    <li>Select "General &gt; Existing Project into Workspace" and click
    "Next"</li>
    <li>Click "Browse" next to "Select root directory", find <code><i>[someDirectory]</i>/google-api-java-client</code>
    and click OK</li>
    <li>Click "Next" and "Finish"</li>
  </ul>
  </li>
</ul>

</body>
</html>
